import request from '@/utils/request'

// 1. 查询站内消息列表 (GET /system/basicInStationMessage/list)
export function listInStationMessage(params) {
  return request({
    url: '/basic/system/basicInStationMessage/list',
    method: 'get',
    params: params
  })
}

// 2. 获取站内消息详细信息 (GET /system/basicInStationMessage/{inStationMessageId})
export function getInStationMessage(inStationMessageId) {
  return request({
    url: `/basic/system/basicInStationMessage/${inStationMessageId}`,
    method: 'get'
  })
}

// 3. 新增站内消息 (POST /system/basicInStationMessage)
export function addInStationMessage(data) {
  return request({
    url: '/basic/system/basicInStationMessage',
    method: 'post',
    data: data
  })
}

// 4. 修改站内消息 (PUT /system/basicInStationMessage)
export function updateInStationMessage(data) {
  return request({
    url: '/basic/system/basicInStationMessage',
    method: 'put',
    data: data
  })
}

// 5. 删除站内消息 (DELETE /system/basicInStationMessage/{inStationMessageIds})
export function deleteInStationMessage(inStationMessageIds) {
  return request({
    url: `/basic/system/basicInStationMessage/${inStationMessageIds}`,
    method: 'delete'
  })
}

// 6. 标记消息为已读/已处理 (PUT /system/basicInStationMessage/read/{inStationMessageId})
export function markMessageAsRead(params) {
  return request({
    url: `/basic/system/basicInStationMessage/read_mark`,
    method: 'get',
    params
  })
}

// 7. 发送站内消息 (POST /system/basicInStationMessage/send)
export function sendInStationMessage(inStationMessageId) {
  return request({
    url: '/basic/system/basicInStationMessage/send/'+inStationMessageId,
    method: 'put',
  })
}